﻿<Page
    x:Class="Wimm.UI.Login.MultiLogin"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Wimm.UI.Login"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="Black" Height="400" Width="600">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="1">
            <StackPanel.Background>
                <ImageBrush ImageSource="../Assets/Splesh2.png"></ImageBrush>
            </StackPanel.Background>
        </StackPanel>
        <ComboBox Name="UserBox" Grid.Row="1" Grid.Column="1" 
                  Height="30" Width="160" Margin="0 10 0 0" 
                  HorizontalAlignment="Center" VerticalAlignment="Top"
                  ItemsSource="{Binding Path=User, Mode=TwoWay}" SelectedItem="{Binding Path=SelectedUser, Mode=TwoWay}"
                  Visibility="{Binding Path=ComboboxVisibile, Mode=TwoWay}">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding DisplayName}"/>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <PasswordBox Name="PassTxt" Grid.Row="1" Grid.Column="1" 
                     PlaceholderText="Password" x:Uid="LoginPasswordBox"
                     Password="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" 
                     Height="23" MinWidth="100" MaxWidth="160"></PasswordBox>
        <Button Name="LoginBtn" Content="Sign in" x:Uid="LoginSignBtn"
                Command="{Binding LoginCommand}" 
                Grid.Row="2" Grid.Column="1" Height="37" Width="100" 
                VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 5 18 5" 
                AutomationProperties.AccessKey="Enter"/>
        <HyperlinkButton Grid.Row="2" Grid.Column="1" Content="Create an account >" x:Uid="LoginCreateHlinkBtn"
                         HorizontalAlignment="Center" VerticalAlignment="Bottom"
                         Command="{Binding RegistrationCommand}"/>

        <TextBlock Grid.Row="2" Text="{Binding ErrorMessage}" FontSize="16" Margin="5" 
                   HorizontalAlignment="Center" VerticalAlignment="Top" 
                   Grid.Column="0" Grid.ColumnSpan="3" Foreground="Red" Visibility="Visible"/>
    </Grid>
</Page>
